Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System version doesn't need to match when assigning a code #1317

Merged
merged 5 commits into from
Aug 4, 2023

Conversation

mint-thompson
Copy link
Collaborator

Fixes #1305 and completes task CIMPL-1147.

A code assigned with a system may include a version as part of the system. This is generally intended to refer to the system's published version in the world, and is not guaranteed to match the version of the CodeSystem FHIR resource. Fish for any version when resolving the system, and do not emit a warning even if the versions don't match.

A code assigned with a system may include a version as part of the
system. This is generally intended to refer to the system's published
version in the world, and is not guaranteed to match the version of the
CodeSystem FHIR resource. Fish for any version when resolving the
system, and do not emit a warning even if the versions don't match.
Copy link
Member

@cmoesel cmoesel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I just have one suggestion that I think is right, but want @jafeltra to confirm.

@@ -952,9 +952,12 @@ export function replaceReferences<T extends AssignmentRule | CaretValueRule>(
}
}
} else if (value instanceof FshCode) {
// the version on a CodeSystem resource is not the same as the system's actual version out in the world.
// so, they don't need to match.
const baseSystem = value.system?.split('|')[0];
const codeSystemMeta = fishForMetadataBestVersion(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're removing the version, I think this can just be fishForMetadata now, right @jafeltra?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! For simplicity, fishForMetadata should be sufficient. Looking at the implementation of fishForMetadata, if there is no | in the the value passed in, it actually doesn't make any difference and will only try to call fishForMetadata. But based on how we've used these functions, we've only been using fishForBestMetadata in the cases where we want the version match or the next best thing.

@jafeltra
Copy link
Collaborator

jafeltra commented Aug 3, 2023

I didn't notice anything else, besides the small change @cmoesel suggested.

Copy link
Member

@cmoesel cmoesel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link
Collaborator

@jafeltra jafeltra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@mint-thompson mint-thompson merged commit 15abd39 into master Aug 4, 2023
14 checks passed
@mint-thompson mint-thompson deleted the cimpl-1147-no-warning-codesystem-version branch August 4, 2023 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SUSHI should not log a warning when specifying the version of a CodeSystem
3 participants